package com.yuyou.tas.admin.mapper;

import com.yuyou.tas.service.api.admin.dto.AuthUserDTO;
import com.yuyou.tas.service.api.admin.dto.SysAuthUserDTO;
import com.yuyou.tas.service.api.admin.dto.TeacherDTO;
import com.yuyou.tas.service.api.admin.entity.AuthUser;
import com.yuyou.tas.util.bean.Pagination;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AuthUserMapper {

    int deleteByPrimaryKey(Long id);

    int insert(AuthUser record);

    AuthUser selectByOrgan7OId(@Param(value="oId") Long oId,@Param(value="authOrganizationId") Long authOrganizationId);
    
    AuthUser selectByPrimaryKey(Long id);

    AuthUserDTO selectUserById(Long id);

    int updateByPrimaryKeySelective(AuthUser record);

    AuthUser selectBaseByPrimaryKey(Long id);

    int updateByPrimaryKey(AuthUser record);

    int findAuthUserPageCount(Pagination<AuthUserDTO> p);

    List<AuthUserDTO> findAuthUserPageList(Pagination<AuthUserDTO> p);

    int findSysAuthUserPageCount(Pagination<SysAuthUserDTO> p);

    List<SysAuthUserDTO> findSysAuthUserPageList(Pagination<SysAuthUserDTO> p);

    AuthUser seleteUserByAcc7Organ(@Param(value="account")String account,@Param(value="authOrganizationId") Long authOrganizationId);

    List<TeacherDTO> findTeacherList(@Param(value="dataSubject")Long dataSubject,
                                     @Param(value="keyword")String keyword,
                                     @Param(value = "authOrganizationId")Long authOrganizationId,
                                     @Param(value = "lessonClassId")Long lessonClassId,
                                     @Param(value = "type")Integer type);

    int countByOrganId(@Param(value="authOrganizationId")Long authOrganizationId , @Param(value="roleId")List<Integer> roleId);
}